home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming All in One / 3D Game Programming All in One Disc.iso / 3D2E / RESOURCES / CH6 / EMAGA6 / control / client / client.cs next >
Text File  |  2003-11-09  |  2KB  |  76 lines

  1. //============================================================================
  2. // control/client/client.cs
  3. //
  4. // This module contains client specific code for handling
  5. // the set up and operation of the player's in-game interface.
  6. //
  7. //  Copyright (c) 2003 by Kenneth C.  Finney.
  8. //============================================================================
  9.  
  10.  
  11. function LaunchGame()
  12. {
  13.    createServer("SinglePlayer", "control/data/maps/book_ch6.mis");
  14.    %conn = new GameConnection(ServerConnection);
  15.    %conn.setConnectArgs("Reader");
  16.    %conn.connectLocal();
  17. }
  18.  
  19. function clientCmdStartGame(%seq)
  20. {
  21. }
  22.  
  23. function clientCmdSyncClock(%time)
  24. // called from within the common code
  25. {
  26.    // Store the base time in the hud control it will automatically increment.
  27.    HudClock.setTime(%time);
  28. }
  29.  
  30. //============================================================================
  31. // the following functions are called from the client common code modules
  32. // these stubs are added here to prevent warning messages from cluttering
  33. // up the log file.
  34. //============================================================================
  35. function onServerMessage()
  36. {
  37. }
  38. function onMissionDownloadPhase1()
  39. {
  40. }
  41. function onPhase1Progress()
  42. {
  43. }
  44. function onPhase1Complete()
  45. {
  46. }
  47. function onMissionDownloadPhase2()
  48. {
  49. }
  50. function onPhase2Progress()
  51. {
  52. }
  53. function onPhase2Complete()
  54. {
  55. }
  56. function onPhase3Complete()
  57. {
  58. }
  59. function onMissionDownloadComplete()
  60. {
  61. }
  62.  
  63. function ShowMenuScreen()
  64. {
  65.    // Startup the client with the menu...
  66.    Canvas.setContent( MenuScreen );
  67.    Canvas.setCursor("DefaultCursor");
  68. }
  69.  
  70. function SplashScreenInputCtrl::onInputEvent(%this, %dev, %evt, %make)
  71. {
  72.    if(%make)
  73.    {
  74.      ShowMenuScreen();
  75.    }
  76. }